#ifndef DAEMON_H
#define DAEMON_H

namespace process {

class Daemon
{
public:
	Daemon();
	~Daemon();
	bool start();
	bool isRunning();

protected:
	virtual void setup() {}
	virtual void teardown() {}
	virtual bool run() = 0;	

private:
	bool daemonize();
	static bool _running;
};

}

#endif DAEMON_H

